﻿@{
    var gridid = Request["GridId"];
    var searchid = gridid + "search";
    var createid = gridid + "create";
}
<div class="easyui-panel" style="margin: 0 0 3px 0; width: 850px" title="搜索 @ViewBag.Title">
    <div style="padding: 2px 5px" id="@searchid">
        @Html.Partial("Search", ViewData["QueryArg"])</div>
    <div style="padding: 2px 5px; clear: both">
        <a class="easyui-linkbutton" plain="true" iconCls='icon-search' onclick="$('#@gridid').datagrid('load',$('form',$('#@searchid')).serializeObject())">
            查找</a> <a class="easyui-linkbutton" iconCls='icon-undo' plain="true" onclick="$('form',$('#@searchid'))[0].reset();">
                清除</a>
    </div>
</div>
@{
    MvcHtmlString createstr = null;
    try
    {
        createstr = Html.Partial("Create", null);
    }
    catch
    {
    }
}
@if (createstr != null)
{
    <div class="easyui-panel" style="margin: 0 0 3px 0; width: 850px" collapsible="true"
    collapsed="true" title="创建 @ViewBag.Title">
        <div style="padding: 2px 5px" id="@createid">
            @createstr</div>
        <div style="padding: 2px 5px; clear: both">
            <a class="easyui-linkbutton" plain="true" onclick="postadd('@gridid','/Product/Create',$('form',$('#@createid')).serializeObject());">
                保存</a> <a class="easyui-linkbutton" plain="true" onclick="$('form',$('#@createid'))[0].reset();">
                    重置</a>
        </div>
    </div>
}
@ViewBag.Script
<div style="height: 500px; width: 850px; margin: 3px 0 0 0">
    @RenderBody()
</div>


